﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2016._12.StringNumbers
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Введите строку");
            string str = Console.ReadLine();

            string[] strArr = str.Split('-');
            int check = 0;
            int countNumbers = 0;
            foreach (var s in strArr)
            {
                countNumbers++;
            }
            Console.WriteLine(countNumbers);

            List<string> repeatNumbers = new List<string>();    

            for (int i = 0; i < countNumbers; i++)
            {
                for (int j = i + 1; j < countNumbers; j++)
                {
                    if (strArr[i] == strArr[j])
                    {
                        repeatNumbers.Add(strArr[i]);
                        check++;
                        //Console.WriteLine("Есть повторы");
                        break;
                    }  
                    
                }
            }
            



            Console.ReadKey();

        }
    }
}
